﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TN_CMS.Domain.Entities;

namespace TN_CMS.Domain.Abstract
{
    public interface ISysAdminRepository
    {
        List<SysAdmin> GetList(int pageIndex, int pageSize, out int total, string orderClause, string whereClause);

        /// <summary>
        /// Get system admin by AdminId
        /// </summary>
        /// <param name="Id">AdminId</param>
        /// <returns></returns>
        SysAdmin GetDetail(int id, bool getInactive = true);

        /// <summary>
        /// Save system admin, use to update or create new system admin
        /// </summary>
        /// <param name="admin">SysAdmin entity</param>
        /// <param name="actorId">AdminId, who save this admin</param>
        /// <returns></returns>
        int Save(SysAdmin admin, int actorId);

        /// <summary>
        /// Deactive admin
        /// </summary>
        /// <param name="id"></param>
        int UpdateActive(int[] arrId, bool isActive);

        /// <summary>
        /// Delete system admin
        /// </summary>
        /// <param name="Id">SysAdmin Id</param>
        /// <returns></returns>
        int Delete(int[] arrId);

        /// <summary>
        /// Login, return SysAdmin if login true, and false otherwise
        /// </summary>
        /// <param name="name">admin name</param>
        /// <param name="hashedPass">hashed password</param>
        /// <returns></returns>
        SysAdmin Login(string name, string hashedPass);
    }
}
